<?php

/**
 * 渠道小程序外包
 */


//渠道端小程序接口
$router->group(['prefix'=>'api/qd', 'namespace'=>'ApiQd'], function () use ($router) {
    //微信授权
    $router->get('wx/token', 'WxAuthController@wxtoken');
    $router->get('wx/phone', 'WxAuthController@wxPhone');
    $router->get('wx/fastPhone', 'WxAuthController@wxFastPhone');
    //首页
    $router->post('brand/index', 'IndexController@getBrandIndex'); //品牌列表
    $router->post('brand/one', 'IndexController@getBrandOne'); //品牌详情
    $router->post('banner/list', 'IndexController@bannerList'); //轮播图
    //素材
    $router->post('material/index', 'MaterialController@getList'); //素材列表
    $router->post('material/one', 'MaterialController@getOne'); //素材详情
    //公共接口
    $router->post('config/all', 'CommonController@getAllConfig'); //获取所有配置
    $router->post('config/key', 'CommonController@getConfigByKey'); //获取单独配置
    //用户
    $router->post('user/info/save', 'UserController@saveWxInfo'); //保存微信信息
    $router->post('user/infobytoken', 'UserController@infoByToken');
    $router->post('coupon/addbynew', 'UserController@addCouponByNew'); //新人领取优惠劵
    $router->post('user/head/upload', 'UserController@headUpload'); //上传头像
    $router->post('user/nick/modify', 'UserController@setNick'); //昵称修改
    $router->post('user/phone/modify', 'UserController@setPhone'); //手机号修改
    $router->post('user/level/list', 'UserController@getLevelList'); //等级列表
    $router->post('user/xieyi', 'UserController@xieyi'); //用户协议
    $router->post('user/team', 'UserController@getTeamList'); //团队
    $router->post('user/teamOrder', 'UserController@getTeamOrderList'); //团队订单
    $router->post('user/teamOrderCount', 'UserController@getTeamOrderCount'); //团队订单统计
    $router->post('recharge/list', 'UserController@getRechargeList'); //充值记录
    $router->post('user/qr/upload', 'UserController@uploadQR'); //上传二维码
    $router->post('user/poster', 'UserController@conflatePoster'); //海报接口

    //商品
    $router->post('goods/cate/list', 'GoodsController@getCateList'); //分类列表
    $router->post('goods/list', 'GoodsController@getGoodsList'); //商品列表
    $router->post('goods/one', 'GoodsController@getGoodsOne'); //商品详情
    $router->post('goods/option', 'GoodsController@getOption'); //商品选项
    $router->post('keyword/list', 'GoodsController@getKeywordList'); //关键词列表
    $router->post('keyword/batch/del', 'GoodsController@keywordBatchDel'); //关键词清理
    $router->post('goods/sku/list', 'GoodsController@getSkuList'); //SKU列表
    //浏览历史
    $router->post('read/add', 'GoodsController@readAdd'); //浏览记录
    $router->post('read/list', 'GoodsController@getReadList'); //浏览历史
    //购物车
    $router->post('cart/list', 'CartController@getList');
    $router->post('cart/add', 'CartController@add');
    $router->post('cart/reduce', 'CartController@reduce'); //递减
    $router->post('cart/batch/del', 'CartController@batchDel'); //批量删除
    $router->post('cart/zhuanhuan', 'CartController@zhuanhuan'); //转换
    //收货地址
    $router->post('address/list', 'AddressController@getList');
    $router->post('address/one', 'AddressController@getOne');
    $router->post('address/option', 'AddressController@getOption');
    $router->post('address/add', 'AddressController@add');
    $router->post('address/modify', 'AddressController@modify');
    $router->post('address/del', 'AddressController@setDel');
    $router->post('address/default', 'AddressController@setDefault');
    $router->post('address/default/one', 'AddressController@getDefaultOne');
    $router->post('address/tocheck', 'AddressController@setChecked');
    //订单
    $router->post('order/list', 'OrderController@getList');
    $router->post('order/option', 'OrderController@getOption'); //下单前选项
    $router->post('order/add', 'OrderController@add'); //购物车下单
    $router->post('order/addbygid', 'OrderController@addByGid'); //直接下单
    $router->post('order/cancel', 'OrderController@cancel'); //取消
    $router->post('order/revoke', 'OrderController@revoke'); //撤回
    $router->post('order/again', 'OrderController@again'); //再来一单
    $router->post('order/one', 'OrderController@getOne'); //详情
    $router->post('order/orderOption', 'OrderController@orderOption'); //直接下单选项
    $router->post('order/receive', 'OrderController@receive'); //收货
    $router->post('order/pickup', 'OrderController@pickup'); //自提

    //收益及提现
    $router->post('income/list', 'IncomeController@getList'); //收益记录
    $router->post('withdraw/list', 'WithdrawController@getList');//提现列表
    $router->post('withdraw/addInfo', 'WithdrawController@addInfo'); //新增账户
    $router->post('withdraw/add', 'WithdrawController@add'); //新增提现
    $router->post('withdraw/modifyInfo', 'WithdrawController@modifyInfo'); //修改账户
    $router->post('withdraw/getInfo', 'WithdrawController@getInfo'); //获取账户详情

    //测试微信支付
    $router->post('pay/wxorder', 'WxPayController@wxorder'); //统一订单
    $router->post('pay/notice', 'WxPayController@notice'); //微信通知
    $router->post('pay/balance', 'WxPayController@balance'); //余额支付
    $router->post('pay/refund', 'WxPayController@refund'); //退款
    $router->post('pay/notice2', 'WxPayController@refundNotice'); //微信通知

    //费用
    $router->post('user/recharge/list', 'UserController@rechargeList'); //会员充值
    $router->post('bond/list', 'UserController@bondList'); //会员充值
});